/* 用户信息样式 */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
}

.user-avatar-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #333;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 悬浮菜单样式 */
.avatar-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 8px 0;
    min-width: 150px;
    display: none;
    z-index: 1000;
    margin-top: 10px;
}

.avatar-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.user-avatar-container:hover .avatar-dropdown {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #000 !important;
    text-decoration: none;
    transition: background-color 0.3s;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #000 !important;
}

/* 确保链接样式不会覆盖颜色 */
.dropdown-item:link,
.dropdown-item:visited,
.dropdown-item:hover,
.dropdown-item:active {
    color: #000 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-name {
    color: white;
    font-weight: 500;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.profile-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.profile-btn:hover {
    background-color: #45a049;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

/* 个人信息头部样式 */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #4CAF50;
}

.avatar-upload {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.upload-btn {
    color: white;
    font-size: 12px;
    cursor: pointer;
}

.upload-btn:hover {
    text-decoration: underline;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* 个人信息样式 */
.profile-info {
    margin-top: 20px;
}

.info-item {
    margin: 15px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.info-item label {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.info-item span {
    color: #666;
} 